'use strict';

angular.module('xuexibangApp')
  .config(function($stateProvider, $urlRouterProvider) {
    $urlRouterProvider.when("/admin", "/admin/teacher");
    $stateProvider
      .state('admin', {
        url: '/admin',
        templateUrl: 'app/admin/admin.html',
        controller: 'AdminCtrl'
      }).state("admin.teacher", {
        url: "/teacher",
        templateUrl: "app/admin/teacher.html",
        controller: 'TeacherCtrl'
      })
      .state("admin.klass", {
        url: "/klass",
        templateUrl: "app/admin/klass.html",
        controller: 'KlassCtrl'
      })
      .state("admin.student", {
        url: "/student",
        templateUrl: "app/admin/student.html",
        controller: 'StudentCtrl'
      });
  });
